<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--导入easyui样式 -->
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/themes/bootstrap/easyui.css" />
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/themes/icon.css" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-1.9.1.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/easyui-lang-zh_CN.js"></script>
<title>用户登录</title>
</head>
<script type="text/javascript">
//配置用户登陆页面
$(function () {
	$('#login').window({    
		title:'用户登录',
		width:500,
		height:500,
		collapsible:false,
		closable:false,
		minimizable:false,
		maximizable:false
	});
	//配置用户框
	$('#uname').textbox({    
		iconCls:'icon-man', 
	    iconAlign:'left' ,
	    prompt:"请输入用户信息"    
	})
	  
	//配置密码框
	$('#upsw').textbox({    
		iconCls:'icon-lock', 
	    iconAlign:'left' ,
	    prompt:"请输入用户密码"    
	})
	//配置提交请求
	$('#loginUser').form({    
	    url:'login.action',    
	    success:function(data){ 
	       if(data=="1"){
	    	   location.href = "showMain";
	       }else{
	    	   $.messager.show({
	    			title:'信息提示',
	    			msg:'登录失败',
	    			timeout:1000,
	    			showType:'slide'
	    		}); 
	       }  
	    }    
	});
	
 	//配置登陆按钮
	$('#btn').linkbutton({    
		onClick:function(){
			$('#loginUser').submit(); 
		}   
	}); 
	  
})

</script> 
<body>
<div id="login"  style="background-color:#f5f5f5;">
	<div id="loginwin" style="margin-left: 150px; margin-top: 150px">
		<form id="loginUser"  method="post">
				<input id="uname" class="easyui-validatebox"  name="user.uname" type="text" style="width: 200px" value="${cookie.uname.value}">
				<br> <br>
				<input id="upsw" class="easyui-validatebox" name="user.upsw" type="password" style="width: 200px" value="${cookie.upsw.value}"> 
				<br> <br> 				 
				<input name="jzw" type="checkbox" /><span style="font-size: xx-small;">记住我</span><br>
				 <a id="btn" style="margin-left: 170px;" type="" class="easyui-linkbutton">登陆</a> 		
		</form>
	</div>
</div>
</body>
</html>